<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="/WEB-INF/view/include/inc.jsp"%>
<!DOCTYPE html >
<html>
<head>
<%@ include file="/WEB-INF/view/jQgrid.jsp"%>
</head>
<body>
	<div class="ibox-content">
		<input type="hidden" id="phoneids" value="${tempids}" />
		<input type="hidden" id="phoneName" value="" />
		<form class="form-horizontal m-t " id="signupForm"
			method="post" enctype="multipart/form-data">
			<div class="form-group">
				<label class="col-sm-3 control-label">手机号码：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="cellphone"
						name="cellphone" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">所属分类：</label>
				<div class="col-sm-8">
				<select class="form-control"  id="type" name="type" >
					<option value="">==请选择==</option>
					<c:forEach items="${fns:getDictList('cellphone_type')}" var="tclassify">
					<option value="${tclassify.value }">${tclassify.valueName }</option>
					</c:forEach>
				</select>
				</div>
			</div>
			<div class="form-group" style="display: none;">
				<label class="col-sm-3 control-label">拥有者：</label>
				<div class="col-sm-8">
					<input type="hidden" class="form-control" id="userId" name="userId"  value="${talentid }"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
				   <textarea rows="2" cols="2" name="remark" placeholder="请输入备注"  class="form-control" ></textarea>
				</div>
			</div>

			<div class="form-group" style="text-align: center;">
				<div class="col-sm-12">
					<button class="btn btn-primary" type="button" id="sub">提交</button>
					<button class="btn btn-primary" type="button" onclick="top.Dialog.close();">取消</button>
				</div>
			</div>
		</form>
	</div>	
	<script type="text/javascript">
	$(top.hangge());
	 $(function () {
	        $("#sub").click(function () {
	            $("#signupForm").ajaxSubmit({
	                url: '<%=contextPath%>/cellphone/add',
						type : 'post',
						dataType : "json",
						success : function(data) {
							if (data.code == 200) {
									var phone = $("#cellphone").val();
									$("#phoneName").val(phone);
									top.Dialog.close();
							}
						}
					});
				});
			});
	</script>
</body>
</html>